package com.easycoding.framework.util;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * <b>Description</b>:因为 Log4J 只能记录 String 消息，所以这个类负责解决把堆栈跟踪转换成 String 的问题<br/>
 * <b>Create Date</b>: 2013-3-8 下午5:13:39<br/>
 * <b>Version</b>: Since JDK 1.6.0<br/>
 * <b>Package</b>: com.easycoding.easyweb.framework.util
 */
public class StackTraceUtil {
	
	public static String getStackTrace(Exception e)
    {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        e.printStackTrace(pw);
        return sw.toString();
    }
}
